<view qq:if="{{goods_list.length > 0}}" class="page">
  <!-- 地址 -->
  <view class="address bg-white arrow-right">
    <navigator url="/pages/user-address/user-address?is_back=1" hover-class="none">
      <view qq:if="{{address != null}}">
        <view class="address-base oh">
          <text>{{address.name}}</text>
          <text class="fr">{{address.tel}}</text>
        </view>
        <view class="address-detail oh">
          <image class="icon fl" src="/images/user-address.png" mode="widthFix" />
          <view class="text fr">{{address.province_name}}{{address.city_name}}{{address.county_name}}{{address.address}}</view>
        </view>
      </view>
      <view qq:if="{{address == null}}" class="no-address cr-888">
        请选择地址
      </view>
    </navigator>
  </view>
  <view class="address-divider spacing-mb"></view>

  <!-- 商品 -->
  <view class="goods bg-white spacing-mb">
    <view qq:for="{{goods_list}}" qq:key="key" class="goods-item oh">
      <image class="goods-image fl" src="{{item.images}}" mode="aspectFill" />
      <view class="goods-base">
        <view class="goods-title multi-text">{{item.title}}</view>
        <block qq:if="{{item.spec != null}}">
          <view class="goods-spec cr-888" qq:for="{{item.spec}}" qq:key="key" qq:for-item="spec">{{spec.type}}:{{spec.value}}
          </view>
        </block>
      </view>
      <view class="oh goods-price">
        <text class="sales-price">￥{{item.price}}
        </text>
        <text qq:if="{{item.original_price > 0}}" class="original-price">￥{{item.original_price}}
        </text>
        <text class="buy-number cr-888">x{{item.stock}}
        </text>
      </view>
    </view>
  </view>

  <!-- 留言 -->
  <view class="content-textarea-view bg-white spacing-mb">
    <textarea qq:if="{{!popup_plugins_coupon_status}}" bindinput="bind_user_note_event" value="{{user_note_value}}" maxlength="60" placeholder="留言" class="wh-auto" />
    <view qq:if="{{popup_plugins_coupon_status}}" class="cr-888">{{user_note_value || '留言'}}</view>
  </view>

  <!-- 优惠劵 -->
  <view qq:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.coupon_list.length > 0}}" class="plugins-coupon bg-white spacing-mb arrow-right" bindtap="plugins_coupon_open_event">
    <text class="cr-666">优惠劵</text>
    <text class="cr-ccc fr">{{plugins_choice_coupon_value}}</text>
  </view>

  <!-- 扩展数据展示 -->
  <view qq:if="{{extension_data.length > 0}}" class="extension-list spacing-mb">
    <view qq:for="{{extension_data}}" qq:key="key" class="item oh">
      <text class="cr-666 fl">{{item.name}}
      </text>
      <text class="text-tips fr">{{item.tips}}
      </text>
    </view>
  </view>

  <!-- 支付方式 -->
  <view qq:if="{{payment_list.length > 0 && common_order_is_booking != 1}}" class="payment-list bg-white oh">
    <view class="item tc fl" qq:for="{{payment_list}}" qq:key="key">
      <view class="item-content br {{(item.selected || '')}}" data-value="{{item.id}}" bindtap="payment_event">
        <image qq:if="{{(item.logo || null) != null}}" class="icon" src="{{item.logo}}" mode="widthFix" />
        <text>{{item.name}}</text>
      </view>
    </view>
  </view>

  <!-- 导航 -->
  <view class="buy-nav oh wh-auto">
    <view class="nav-base bg-white fl single-text">
      <text>合计：</text>
      <text class="sales-price">￥{{total_price}}</text>
    </view>
    <view class="fr nav-submit">
      <button class="bg-main wh-auto" type="default" bindtap="buy_submit_event" disabled="{{buy_submit_disabled_status}}" hover-class="none">提交订单</button>
    </view>
  </view>
</view>

<view qq:if="{{goods.length == 0}}">
    <import src="/pages/common/nodata.wxml" />
    <template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>

<!-- 优惠劵选择 -->
<component-popup prop-show="{{popup_plugins_coupon_status}}" prop-position="bottom" bindonclose="plugins_coupon_close_event">
  <view class="plugins-coupon-popup bg-white">
    <view class="close oh">
      <view class="fr" catchtap="plugins_coupon_close_event">
        <icon type="clear" size="20" />
      </view>
    </view>
    <view qq:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.coupon_list.length > 0}}" class="coupon-container oh br-b">
      <view class="not-use-tips tc">
        <text bindtap="plugins_coupon_not_use_event">不使用优惠劵</text>
      </view>
      <block qq:for="{{plugins_coupon_data.coupon_list}}" qq:key="item">
        <view class="item spacing-mt bg-white" style="border:1px solid {{item.coupon.bg_color_value}};">
          <view class="v-left fl">
            <view class="base single-text" style="color:{{item.coupon.bg_color_value}};">
              <text class="symbol">￥</text>
              <text class="price">{{item.coupon.discount_value}}</text>
              <text class="unit">{{item.coupon.type_unit}}</text>
              <text qq:if="{{(item.coupon.desc || null) != null}}" class="desc cr-888">{{item.coupon.desc}}</text>
            </view>
            <view qq:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666 single-text">{{item.coupon.use_limit_type_name}}</view>
            <view class="base-time cr-888 single-text">{{item.time_start_text}} 至 {{item.time_end_text}}</view>
          </view>
          <view class="v-right fr" style="background:{{item.coupon.bg_color_value}};" data-index="{{index}}" data-value="{{item.id}}" bindtap="plugins_coupon_use_event">
            <text class="circle"></text>
            <text>{{plugins_use_coupon_id == item.id ? '已选' : '选择'}}</text>
          </view>
        </view>
      </block>
    </view>
  </view>
</component-popup>